package cn.skyquant.quant4j.api.ylzc;

import cn.skyquant.quant4j.sdk.enums.Status;
import cn.skyquant.quant4j.sdk.enums.YlzcType;
import cn.skyquant.quant4j.sdk.util.time.CalendarUtils;

import java.io.Serializable;
import java.util.Date;

public class YlzcDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    public static final Integer defaultPeriod = 86400;
    public Integer id;
    public String symbol;
    public Integer period;
    public Date thedate;
    public YlzcType type;
    public Integer level;
    public Double value;
    public Status status;

    public YlzcDTO() {
    }

    public YlzcDTO(String symbol, Integer period, Date thedate, YlzcType type, Integer level, Double value) {
        this.symbol = symbol;
        this.period = period;
        this.thedate = thedate;
        this.type = type;
        this.level = level;
        this.value = value;
    }

    @Override
    public String toString() {
        return "{" + CalendarUtils.formatSimple(thedate) + ":" +type.name()+ "-" + level + ":" + value + "}";
    }
}
